import org.xmlpull.v1.builder.XmlDocument;
import org.xmlpull.v1.builder.XmlElement;

import wsdm.WSDMException;
import wsdm.WSDMProcessor;
import xsul.XmlConstants;
import xsul.processor.DynamicInfosetProcessorException;
import xsul.processor.soap_over_http.SoapHttpDynamicInfosetProcessor;
import xsul.soap.SoapUtil;


public class MyService extends SoapHttpDynamicInfosetProcessor{
	private WSDMProcessor processor;
	public MyService() throws WSDMException{
		processor = new WSDMProcessor();
	}
	@Override
	public XmlElement processMessage(XmlElement message) throws DynamicInfosetProcessorException {
		
		return null;
	}
	@Override
	public XmlDocument processSoapEnvelope(XmlElement envelope, SoapUtil soapFragrance) throws DynamicInfosetProcessorException {
		try {
			System.out.println(XmlConstants.BUILDER.serializeToString(envelope));
			return processor.processMessage(envelope,soapFragrance);
		} catch (Exception e) {
			e.printStackTrace();
			throw new DynamicInfosetProcessorException(e.getMessage(),e);
		}
	}
}
